<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>经方判断</title>
    <link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../css/index.css?x">
    <link rel="stylesheet" type="text/css" href="../zTree_v3/css/zTreeStyle/zTreeStyle.css">
    <link rel="stylesheet" type="text/css" href="../jqueryconfirm/jquery-confirm.min.css">
    <link rel="stylesheet" type="text/css" href="../json-viewer/jquery.json-viewer.css">
    <link rel="stylesheet" type="text/css" href="../webuploader-0.1.5/webuploader.css"  >
    <link rel="stylesheet" type="text/css" href="../jqueryui/jquery-ui.css" />
    <link href="html/font-awesome.css" rel="stylesheet">
    <link href="html/animate.css" rel="stylesheet">
    <link href="html/owl.css" rel="stylesheet">
    <link href="html/owl_002.css" rel="stylesheet">
    <link href="html/prettyPhoto.css" rel="stylesheet">
    <link href="html/main.css" rel="stylesheet">
    <style type="text/css">
        .zhixing_sty_1 {
            width: 270px;
            height: 40px;
            border-width: 0px;
            border-radius: 3px;
            background: #1E90FF;
            cursor: pointer;
            outline: none;
            font-family: Microsoft YaHei;
            color: white;
            font-size: 17px;
        }
        .zhixing_sty_1:hover {
            background: #5599FF;
        }
    </style>
</head>
<body id="home" class="homepage" style="padding-top:0px;">
    <header id="header">
    </header><!--/header-->
    <div class="copyrights"></div>
    <section id="features" style="padding-top:50px;">
        <div class="container">
            <div class="section-header">
                <h2 class="section-title text-center wow fadeInDown animated" style="visibility: visible; animation-name: fadeInDown;">经方诊断</h2>
                <p   class="text-center wow fadeInDown animated" style="visibility: visible; animation-name: fadeInDown;text-indent:2em;">
                    经方诊断，经方诊断。经方诊断经方诊断经方诊断经方诊断经方诊断经方诊断
                    根据刻下症、实验室检查、查体、现病史、既往史五个维度为条件，并且以不同条件下不同内容，
                    进行自由组合，形成不同的规则和概率。用户通过客户端传入不同的条件、触发不同的规则，则返回不同的概率。
                    科研人员通过维护不同的规则来管理和控制不同条件下的概率。
                </p>
            </div>
            <div id="cont_01" class="row" style="border-top:thin double #2a95be;border-bottom:thin double #2a95be;">
                <div class="col-sm-6" style="width:100%;">
                    <div class="media service-box wow fadeInRight animated" style="visibility: visible; animation-name: fadeInRight;margin-top:20px;">
                        <h4 class="media-heading">刻下症</h4>
                        <div class="media-body" style="display:block;height:200px;overflow:auto;background-color:#FCFCFC;width: 100%;">
                            <p style="" id="kxz_content">



                            </p>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6" style="width:100%;">
                    <div class="media service-box wow fadeInRight animated" style="visibility: visible; animation-name: fadeInRight;margin-top:20px;">
                        <h4 class="media-heading">脉象</h4>
                        <div class="media-body" style="display:block;height:200px;overflow:auto;background-color:#FCFCFC;width: 100%;">
                            <p style="" id="mx_content">



                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div style="text-align:center;width:100%;border-top:thin dashed #2a95be;border-bottom:thin dashed #2a95be;padding:20px;">
                <input type="button" id="init_start" class="zhixing_sty_1" onclick="zhixing()" value="执行" />
            </div>
            <div id="content_result">



            </div>
        </div>
    </section>



    <script type="text/javascript" src="../js/request.js"></script>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../jqueryui/jquery-ui.min.js"></script>
    <script type="text/javascript" src="../js/jquery.extend.date.js"></script>
    <script type="text/javascript" src="../bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript" src="../bootstrap/js/bootstrap-paginator.js"></script>
    <script type="text/javascript" src="../jqueryconfirm/jquery-confirm.min.js" ></script>
    <script type="text/javascript" src="../zTree_v3/js/jquery.ztree.all.js"></script>
    <script type="text/javascript" src="../bootstrap/js/bootstrap-contextmenu.js"></script>
    <script type="text/javascript" src="../json-viewer/jquery.json-viewer.js"></script>
    <script type="text/javascript" src="../webuploader-0.1.5/webuploader.js"></script>
    <script src="html/owl.js"></script>
    <script src="html/mousescroll.js"></script>
    <script src="html/smoothscroll.js"></script>
    <script src="html/jquery_003.js"></script>
    <script src="html/jquery_004.js"></script>
    <script src="html/jquery_002.js"></script>
    <script src="html/wow.js"></script>
    <script type="text/javascript">
        $(function () {
            finddata_1(1);
            finddata_2(2);
            //findjfdata();



        });
        function getidbystr(_str) {
            var s2text = "hh";
            $.ajax({
                type:"post",
                url:"http://zyy.yesocr.cn/hoaservice_leizhuren/ruleapi/getjinfangbean",
                data:{
                    apitoken:"Q174NnfoGTwNlKQGsGxleY2LlZsfWwx8NLafLAoiVrfpqOOCRf9PpjsF811oAjGs",
                    s1:_str
                },
                cache:false,
                async:false,
                success:function (_info) {
                    if (_info.code=="1"){
                        s2text = _info.data.s2;
                    }
                }
            });
            return s2text;

        }
        function zhixing() {

            var cknamebs = "";
            $("input[name='p1_name']:checked").each(function (_index,_this) {
                var textcont = $(_this).parent().text();
                cknamebs+=";"+getidbystr($.trim(textcont)).replace(".0","");
            })
            if(cknamebs.length>0){
                cknamebs = cknamebs.substring(1,cknamebs.length);
                $.ajax({
                    type:"post",
                    url:"http://zyy.yesocr.cn/hoaservice_leizhuren/ruleapi/jinfangpanduanbool",
                    data:{
                        apitoken:"Q174NnfoGTwNlKQGsGxleY2LlZsfWwx8NLafLAoiVrfpqOOCRf9PpjsF811oAjGs",
                        s1:cknamebs
                    },
                    cache:false,
                    async:false,
                    success:function (_info) {
                        if(_info.code=="1"){
                            var htmlstr = "";
                                        htmlstr += "<div>输出1："+_info.data.r1+"</div>";
                                        htmlstr += "<div>输出2："+_info.data.r2+"</div>";
                                        htmlstr += "<div>输出3："+_info.data.r3+"</div>";
                                        htmlstr += "<div>输出4："+_info.data.r4+"</div>";
                            $("#content_result").html(htmlstr);
                        }

                    }
                });




            }else {
                alert("请选择条件")
                return false;
            }
        }


        /***
         * 获取数据(刻下症)
         * */
        function finddata_1(_num) {
            $.ajax({
                type:"post",
                url:"http://zyy.yesocr.cn/hoaservice_leizhuren/ruleapi/jingfangdata",
                data:{
                    apitoken:"Q174NnfoGTwNlKQGsGxleY2LlZsfWwx8NLafLAoiVrfpqOOCRf9PpjsF811oAjGs",
                    s1:_num
                },
                cache:false,
                async:false,
                success:function (_info) {
                    if(_info.code=="1"){
                        var htmlstr = "";
                        var datalist = _info.data.r1.split(";");
                        for (var i in datalist){
                            var dataobj = $.trim(datalist[i].replace("\n",""));
                            if(dataobj==""){
                                continue;
                            }
                            htmlstr+="<div style=\"width:20%;float:left;padding:15px;\"><input type=\"checkbox\"   name=\"p1_name\" style=\"float: left;\" />&nbsp;&nbsp;<div style=\"width: 80%;float: left;margin-left: 10px;\">"+dataobj+"</div></div>";
                        }
                        $("#kxz_content").html(htmlstr);

                    }
                }
            });
        }
        /***
         * 获取数据(脉象)
         * */
        function finddata_2(_num) {
            $.ajax({
                type:"post",
                url:"http://zyy.yesocr.cn/hoaservice_leizhuren/ruleapi/jingfangdata",
                data:{
                    apitoken:"Q174NnfoGTwNlKQGsGxleY2LlZsfWwx8NLafLAoiVrfpqOOCRf9PpjsF811oAjGs",
                    s1:_num
                },
                cache:false,
                async:false,
                success:function (_info) {
                    if(_info.code=="1"){
                        var htmlstr = "";
                        var datalist = _info.data.r1.split(";");
                        for (var i in datalist){
                            var dataobj = $.trim(datalist[i].replace("\n",""));
                            if(dataobj==""){
                                continue;
                            }
                            htmlstr+="<div style=\"width:20%;float:left;padding:15px;\"><input type=\"checkbox\"    name=\"p1_name\" style=\"float: left;\" />&nbsp;&nbsp;<div style=\"width: 80%;float: left;margin-left: 10px;\">"+dataobj+"</div></div>";
                        }
                        $("#mx_content").html(htmlstr);

                    }
                }
            });
        }
        /***
         * 判断
         */
        function findjfdata() {
            $.ajax({
                type:"post",
                url:"http://zyy.yesocr.cn/hoaservice_leizhuren/ruleapi/getjinfangbean",
                data:{
                    apitoken:"Q174NnfoGTwNlKQGsGxleY2LlZsfWwx8NLafLAoiVrfpqOOCRf9PpjsF811oAjGs",
                    s1:"1"
                },
                cache:false,
                async:false,
                success:function (_info) {
                    console.log(_info);
                }
            });
        }




    </script>
</body>
</html>